import request from '@/router/axios';

// 列表
export const getList = (current, size, params) => {
    return request({
        url: '/api/twoSinglesAndThreeCards/knowablecard/page',
        method: 'get',
        params: {
            ...params,
            current,
            size,
        }
    })
}

// 详情
export const getDetail = (id) => {
    return request({
        url: '/api/twoSinglesAndThreeCards/knowablecard/detail',
        method: 'get',
        params: {
            id
        }
    })
}

// 删除
export const remove = (ids) => {
    return request({
        url: '/api/twoSinglesAndThreeCards/knowablecard/remove',
        method: 'post',
        params: {
            ids,
        }
    })
}

// 新增
export const add = (row) => {
    return request({
        url: '/api/twoSinglesAndThreeCards/knowablecard/save',
        method: 'post',
        data: row
    })
}

// 编辑
export const update = (row) => {
    return request({
        url: '/api/twoSinglesAndThreeCards/knowablecard/update',
        method: 'post',
        data: row
    })
}

// 获取管控措施类型
export const getControlMeasureTypes = () => {
    return request({
        url: '/api/blade-system/dict-biz/dictionary?code=control_measures',
        method: 'get'
    })
}